package com.taoshen.aspect;

import cn.hutool.aop.aspects.SimpleAspect;
import cn.hutool.log.StaticLog;

import java.lang.reflect.Method;

/**
 * @Description
 * @Author Zhang Litao
 * @Date 2021/12/16 17:10
 */
public class TestHutoolAspect extends SimpleAspect {
    @Override
    public boolean before(Object target, Method method, Object[] args) {
        StaticLog.info("执行hutool前置通知！！！");
        return true;
    }

    @Override
    public boolean after(Object target, Method method, Object[] args, Object returnVal) {
        StaticLog.info("执行hutool后置通知！！！");
        return true;
    }

    @Override
    public boolean afterException(Object target, Method method, Object[] args, Throwable e) {
        return super.afterException(target, method, args, e);
    }
}
